﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >

    <DataTemplate x:Key="SecurityCommandViewModelTemplate">
        <StackPanel>
            <TextBlock Text="{Binding Message}" Style="{StaticResource TextBlockStyle}"/>
            <Button Content="Login" Command="{Binding Command}" CommandParameter="LoginCommand"/>
        </StackPanel>
    </DataTemplate>

    <DataTemplate x:Key="UserCommandViewModelTemplate">
        <StackPanel>
            <StackPanel.Resources>
                <Style TargetType="ListBox">
                    <Setter Property="Foreground" Value="{StaticResource AppForeground}"/>
                    <Setter Property="Background" Value="{StaticResource AppBackground}"/>
                </Style>
                <Style TargetType="TextBlock">
                    <Setter Property="Foreground" Value="{StaticResource AppForeground}"/>
                    <Setter Property="HorizontalAlignment" Value="Right"/>
                    <Setter Property="Width" Value="75"/>
                </Style>
                <Style TargetType="TextBox">
                    <Setter Property="Width" Value="150"/>
                </Style>
            </StackPanel.Resources>
            <ListBox x:Name="lstUserList" ItemsSource="{Binding UserList}" SelectedValue="{Binding SelectedUser}"/>
            <StackPanel Orientation="Horizontal">
                <Button Content="Add" Command="{Binding Command}" CommandParameter="UserManagerCommandAdd"/>
                <Button Content="Edt" Command="{Binding Command}" CommandParameter="UserManagerCommandEdit"/>
                <Button Content="Sve" Command="{Binding Command}" CommandParameter="UserManagerCommandSave"/>
                <Button Content="Undo" Command="{Binding Command}" CommandParameter="UserManagerCommandUndo"/>
                <Button Content="Del" Command="{Binding Command}" CommandParameter="UserManagerCommandDelete"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="FirstName" />
                <TextBox Text="{Binding FirstName, Mode=TwoWay}"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="LastName" />
                <TextBox Text="{Binding LastName, Mode=TwoWay}"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="MiddleName" />
                <TextBox Text="{Binding MiddleName, Mode=TwoWay}"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="DateOfBirth" />
                <TextBox Text="{Binding DateOfBirth, Mode=TwoWay}"/>
            </StackPanel>
            <TextBox Text="{Binding StatusMessage}" Height="100" 
                     Background="LightGray" IsReadOnly="True"
                     Width="{StaticResource AppWidth}"
                   VerticalScrollBarVisibility="Auto"
                   HorizontalScrollBarVisibility="Auto"/>
            <Button Content="Show Login View" Command="{Binding Command}" CommandParameter="ActivateLoginViewCommand"/>

        </StackPanel>
    </DataTemplate>

</ResourceDictionary>